package com.indusfo.spc.mapper;

import com.indusfo.spc.pojo.MatBadpheno;
import com.indusfo.spc.pojo.OrderBadpheno;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author liub
 * @Date 2019/11/25 15:45
 * @Version 1.0
 */

public interface OrderBadphenoMapper {
    /**
     * 新增
     */
    int insertOrderBadpheno(OrderBadpheno orderBadpheno);

    /**
     * 修改
     */
    int updateOrderBadpheno(OrderBadpheno orderBadpheno);

    /**
     * 查询
     */
    List<OrderBadpheno> queryOrderBadpheno(OrderBadpheno orderBadpheno);

    /**
     * 总数
     */
    int countOrderBadpheno(OrderBadpheno orderBadpheno);

    /**
     * 判重
     */
    int checkOrderBadpheno(OrderBadpheno orderBadpheno);

    /**
     * 启停
     */
    int deleteOrderBadpheno(@Param("orderBadphenoIds") List<Integer> orderBadphenoIds, @Param("dataState") Integer dataState);

    /**
     * 级联删除查询
     */
    List<OrderBadpheno> queryOrderBadphenoByOrderFlowId(@Param("orderFlowId") Integer orderFlowId);

    /**
     * 级联删除
     */
    int deleteOrderBadphenoByOrderBadphenoId(@Param("orderBadphenoId") Integer orderBadphenoId, @Param("dataState") Integer dataState);

    int insertOrderBadphenoByMatBadphenoList(@Param("matBadphenoList") List<MatBadpheno> matBadphenoList);
}